<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>上海山宝破碎机-中国破碎机生产和破碎机出口基地</title>
    <META
            NAME="keywords"
            CONTENT="破碎机，颚式破碎机，锤式破碎机，碎石破碎机，圆锥破碎机反击式破碎机，振动筛，喂料机，振动给料机，洗砂机，采矿设备，矿山机械，矿山机器"
    />
    <meta
            name="description"
            content="上海建设路桥机械设备有限公司是上海破碎机专业生产厂家，其山宝牌商标被认定为中国驰名商标，公司主营圆锥破碎机、单段破碎机、烘干破碎机、颚式破碎机、反击式破碎机等"
    />
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/statics/images/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/fonts/iconfont.css" />
    <!-- swiper -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/localjs/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/localjs/swiper/swiper.min.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/common.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/detail.css" />
    <script src="${pageContext.request.contextPath}/statics/localjs/jquery/jquery.min.js"></script>



</head>

<body>
<!-- 头部 -->
<header class="sb_header w980 clearfix">
    <a href="#" class="logo fl"><img src="${pageContext.request.contextPath}/statics/images/logo.jpg" alt=""/></a>
    <ul class="fl">
        <li><a href="${pageContext.request.contextPath}/newsShow">首页</a></li>
        <li><a href="${pageContext.request.contextPath}/threeProduct">商城</a></li>
        <li><a href="#">解决方案</a></li>
        <li><a href="${pageContext.request.contextPath}/showEnquiry">技术支持</a></li>
    </ul>
    <p id="index">
        <a class="iconfont icon-user"></a>
        <a href="${pageContext.request.contextPath}/car/addMyCard" class="iconfont icon-buy"></a>
    </p>
    <ul class="firstDown">
        <li><a href="${pageContext.request.contextPath}/myOrderByIdAdmin">我的订单</a></li>
        <li><a href="#">个人信息</a></li>
        <li><a href="#">登录</a></li>
    </ul>
</header>

<!-- 详情页 -->
<section class="w980">
    <p class="title">产品分类</p>
    <div class="message">
        <!-- 左边列表 -->
        <ul class="categories fl">
            <!-- 一级菜单 -->
            <c:forEach items="${firstProductCategoryList}" var="temp" >
                <li>
                    <a href="#">${temp.name}</a>
                    <!-- 二级菜单 -->
                    <ul class="levelOne">
                        <c:forEach items="${productCategoryVoList}" var="vo">
                            <c:if test="${temp.id==vo.productCategory.parentid }">
                                <li>
                                    <a href="#" class="iconfont icon-right">${vo.productCategory.name}</a>
                                    <!-- 三级 -->
                                    <ul class="levelTwo">
                                        <c:forEach items="${vo.productCategoryList}" var="vo2">
                                            <li>
                                                <a href="thirdProduct?thirdId=${vo2.id}" class="iconfont icon-right">${vo2.name}</a>
                                            </li>
                                        </c:forEach>
                                    </ul>
                                </li>
                            </c:if>
                        </c:forEach>
                    </ul>
                </li>
            </c:forEach>
        </ul>
        <!-- 右边商品 -->
        <div class="product fl">
            <div class="product_name">
                <span>${product.name}</span>
                <img src="${pageContext.request.contextPath}/statics${product.image}" alt="" />
            </div>
            <div class="advance">
                <p class="goods">产品优势</p>
                <div class="line"></div>
                  <p>${product.description}</p>

            </div>
            <div class="promise">
                <p class="work">工作原理图</p>
                <div class="line"></div>
                <img src="${pageContext.request.contextPath}/statics${product.diagram}" alt="" />
            </div>
            <div class="parma">
                <p class="work">技术参数</p>
                <div class="line"></div>
                <img src="${pageContext.request.contextPath}/statics${product.tec_img}" alt="" />
            </div>
            <div class="buy">


                <div class="clearfix">
                    <ul class="confirm_q">
                        <li class="confirm_q_f">商品单价：<span>￥</span><i>${product.price}</i></li>
                    </ul>
                </div>

                <div class="clearfix">
                    <a href="javascript:void(0);"  onclick="addCartByParam('${product.id}',1);" target="_blank" class="tijiao">加入购物车</a>
                     <%--<input  type="text" value="${product.id}" >--%>
                </div>
            </div>
        </div>
    </div>
</section>

<script>
    function addCartByParam(quantity) {
        // alert(quantity);
        $.ajax({
            url:"${pageContext.request.contextPath}/car/addOne",
            data:{"id":quantity},
            type:"post",
            dataType:"json",
            success:function(obj){
                alert("加入成功!");
                $("#tv_span").html(obj)

            }
        });
    }

</script>

<!-- 底部 -->
<footer class="sb_footer w980">
    <p class="top">
        <a href="#">联系我们</a>
        <span>|</span>
        <a href="otherinfo.asp?c=12">隐私条款</a>
        <span>|</span>
        <a href="otherinfo.asp?c=13">法律声明</a>
        &nbsp;&nbsp;
        <span>电话：+86(21)-51393838</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span>地址：上海市奉贤区金汇镇工业路188号</span>
    </p>

    <p class="bottom">
        Copyright &copy; 2019 上海建设路桥机械设备有限公司 版权所有
        沪ICP备00226688号
        <!--<a href="http://www.free-web.cn">技术支持：网动力</a>-->
    </p>
</footer>
<script src="${pageContext.request.contextPath}/statics/localjs/jquery/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/statics/js/common.js"></script>
</body>
</html>
